#include <glib.h>

gint main(gint argc, gchar **argv)
{
    gchar *mem[10000];
    gint i,j;

    // Allocate 10000 blocks.
    for (i = 0; i < 10000; i++) {
        mem[i] = g_slice_alloc (50);

        // Fill in the memory with some junk.
        for (j = 0; j < 50; j++) {
            mem[i][j] = i * j;
        }
    }

    // Now free all of the blocks.
    for (i = 0; i < 10000; i++) {
        g_slice_free1 (50, mem[i]);
    }

    return 0;
}